home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pdclk145.zip / PKTDR.ASM < prev    next >
Assembly Source File  |  1991-05-27  |  1KB  |  65 lines

  1. ;************************************************************************
  2. ;************************************************************************
  3. ;*
  4. ;*        Packet interface routines
  5. ;*
  6. ;************************************************************************
  7. ;************************************************************************
  8.  
  9.  
  10. int_pkt        macro
  11.         pushf
  12.         cli
  13.         call    their_isr
  14.         endm
  15.  
  16. their_isr    dd    ?
  17. packet_int_no    db    60h,?,?,?
  18. signature    db    'PKT DRVR',0
  19. signature_len    equ    $-signature
  20. no_signature    db    "No packet driver at that address",'$'
  21.  
  22.  
  23.  
  24. ;************************************************************************
  25. ;*        FindPktint
  26. ;************************************************************************
  27.  
  28. FindPktint    proc    near
  29.   FindLoop:
  30.         call    TestPktInt
  31.         je    FindRet
  32.         inc    packet_int_no
  33.         cmp    packet_int_no,80h
  34.         jb    FindLoop
  35.  
  36.         mov    dx,offset no_signature
  37.         mov    ah,9
  38.         int    21h
  39.         mov    ax,4c02h
  40.         int    21h
  41.   FindRet:
  42.         ret
  43. Findpktint    endp
  44.  
  45.  
  46.  
  47. ;************************************************************************
  48. ;*        TestPktInt
  49. ;************************************************************************
  50.  
  51. TestPktInt    proc    near
  52.         mov    ah,35h            ; get their packet interrupt.
  53.         mov    al,packet_int_no
  54.         int    21h
  55.         mov    their_isr.offs,bx
  56.         mov    their_isr.segm,es
  57.         lea    di,3[bx]
  58.         mov    si,offset signature
  59.         mov    cx,signature_len
  60.         repe    cmpsb
  61.         ret
  62. TestPktInt    endp
  63.  
  64.  
  65.